﻿@model PageList<Menu>
<table class="table table-striped table-bordered table-hover table-fix table-manage">
    <thead>
        <tr>
            @*<th class="w20px">
                <label><input class="checkbox-check" type="checkbox"><span></span></label>
            </th>*@
            <th class="text-center w100px" data-order="@nameof(Menu.Name)">名称</th>
            <th class="text-center w100px" data-order="@nameof(Menu.Code)">编码</th>
            <th class="text-center w180px" data-order="@nameof(Menu.Url)">地址</th>
            <th class="text-center w30px" data-order="@nameof(Menu.IsEnabled)">启用</th>
            <th class="text-center w30px" data-order="@nameof(Menu.IsPublic)">公开</th>
            <th class="text-center w30px" data-order="@nameof(Menu.IsExpand)">展开</th>
            <th class="text-center w40px">操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var record in Model)
        {
            <tr>
                @*<td>
                    <label><input class="checkbox-check" type="checkbox" value="@record.Id"><span></span></label>
                </td>*@
                <td class="text-center nowrap">
                    <a class="uimodal" data-backdrop="true"
                       data-url="@Url.Action("Details", new {id = record.Id})"
                       title="@record.Name">
                        <i class="@record.IconCls"></i>
                        @record.Name
                    </a>
                </td>
                <td class="text-center nowrap"><span title="@record.Code">@record.Code</span></td>
                <td class="text-center nowrap"><span title="@record.Url">@record.Url</span></td>

                <td class="text-center">@Html.BoolLabel(record.IsEnabled)</td>
                <td class="text-center">
                    @if (record.IsPublic)
                    {
                        <span class="label label-success">公开</span>
                    }
                </td>
                <td class="text-center">
                    @if (record.IsExpand)
                    {
                        <span class="label label-success">展开</span>
                    }
                </td>
                <td class="text-center">
                    <a class="color-primary uimodal" data-toggle="tooltip"
                       data-url="@Url.Action("Edit", new {id = record.Id})"
                       title="编辑">
                        <i class="fa fa-lg fa-edit"></i>
                    </a>
                    &nbsp;
                    <a class="color-danger tsdelete" data-toggle="tooltip"
                       data-refresh-tree="true"
                       data-url="@Url.Action("Delete", new {id = record.Id})"
                       title="删除">
                        <i class="fa fa-lg fa-trash-o"></i>
                    </a>
                </td>
            </tr>
        }
    </tbody>
</table>
@Html.RenderPages(Model)